{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "### Example from: \n",
    "https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "c5oL4Cc9lwHR"
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "import sys\n",
    "sys.path.append(\"..\") # Adds higher directory to python modules path.\n",
    "from ta import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>TR</th>\n",
       "      <th>+DM 1</th>\n",
       "      <th>-DM 1</th>\n",
       "      <th>TR14</th>\n",
       "      <th>+DM14</th>\n",
       "      <th>-DM14</th>\n",
       "      <th>+DI14</th>\n",
       "      <th>-DI14</th>\n",
       "      <th>DI 14 Diff</th>\n",
       "      <th>DI 14 Sum</th>\n",
       "      <th>DX</th>\n",
       "      <th>ADX</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>499</th>\n",
       "      <td>3-Feb-11</td>\n",
       "      <td>57.14</td>\n",
       "      <td>56.40</td>\n",
       "      <td>57.06</td>\n",
       "      <td>0.74</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.44</td>\n",
       "      <td>9.77</td>\n",
       "      <td>2.49</td>\n",
       "      <td>2.38</td>\n",
       "      <td>25.45</td>\n",
       "      <td>24.37</td>\n",
       "      <td>1.08</td>\n",
       "      <td>49.82</td>\n",
       "      <td>2.17</td>\n",
       "      <td>16.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>500</th>\n",
       "      <td>4-Feb-11</td>\n",
       "      <td>57.42</td>\n",
       "      <td>56.90</td>\n",
       "      <td>57.38</td>\n",
       "      <td>0.52</td>\n",
       "      <td>0.28</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.60</td>\n",
       "      <td>2.59</td>\n",
       "      <td>2.21</td>\n",
       "      <td>26.99</td>\n",
       "      <td>23.05</td>\n",
       "      <td>3.94</td>\n",
       "      <td>50.03</td>\n",
       "      <td>7.88</td>\n",
       "      <td>16.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>501</th>\n",
       "      <td>7-Feb-11</td>\n",
       "      <td>57.97</td>\n",
       "      <td>57.40</td>\n",
       "      <td>57.65</td>\n",
       "      <td>0.59</td>\n",
       "      <td>0.55</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.51</td>\n",
       "      <td>2.95</td>\n",
       "      <td>2.05</td>\n",
       "      <td>31.08</td>\n",
       "      <td>21.60</td>\n",
       "      <td>9.48</td>\n",
       "      <td>52.69</td>\n",
       "      <td>17.99</td>\n",
       "      <td>16.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>502</th>\n",
       "      <td>8-Feb-11</td>\n",
       "      <td>58.07</td>\n",
       "      <td>57.56</td>\n",
       "      <td>58.03</td>\n",
       "      <td>0.51</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.34</td>\n",
       "      <td>2.84</td>\n",
       "      <td>1.91</td>\n",
       "      <td>30.46</td>\n",
       "      <td>20.42</td>\n",
       "      <td>10.03</td>\n",
       "      <td>50.88</td>\n",
       "      <td>19.72</td>\n",
       "      <td>16.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>503</th>\n",
       "      <td>9-Feb-11</td>\n",
       "      <td>58.12</td>\n",
       "      <td>57.75</td>\n",
       "      <td>57.93</td>\n",
       "      <td>0.37</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.04</td>\n",
       "      <td>2.69</td>\n",
       "      <td>1.77</td>\n",
       "      <td>29.76</td>\n",
       "      <td>19.59</td>\n",
       "      <td>10.18</td>\n",
       "      <td>49.35</td>\n",
       "      <td>20.62</td>\n",
       "      <td>16.71</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Date   High    Low  Close    TR  +DM 1  -DM 1  TR14  +DM14  -DM14  \\\n",
       "499  3-Feb-11  57.14  56.40  57.06  0.74   0.00   0.44  9.77   2.49   2.38   \n",
       "500  4-Feb-11  57.42  56.90  57.38  0.52   0.28   0.00  9.60   2.59   2.21   \n",
       "501  7-Feb-11  57.97  57.40  57.65  0.59   0.55   0.00  9.51   2.95   2.05   \n",
       "502  8-Feb-11  58.07  57.56  58.03  0.51   0.10   0.00  9.34   2.84   1.91   \n",
       "503  9-Feb-11  58.12  57.75  57.93  0.37   0.05   0.00  9.04   2.69   1.77   \n",
       "\n",
       "     +DI14  -DI14  DI 14 Diff  DI 14 Sum     DX    ADX  \n",
       "499  25.45  24.37        1.08      49.82   2.17  16.63  \n",
       "500  26.99  23.05        3.94      50.03   7.88  16.01  \n",
       "501  31.08  21.60        9.48      52.69  17.99  16.15  \n",
       "502  30.46  20.42       10.03      50.88  19.72  16.40  \n",
       "503  29.76  19.59       10.18      49.35  20.62  16.71  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series = pd.read_csv('qqq_adx.csv')\n",
    "\n",
    "\n",
    "series.tail()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "colab": {
     "height": 418
    },
    "colab_type": "code",
    "executionInfo": {
     "elapsed": 915,
     "status": "ok",
     "timestamp": 1552960592858,
     "user": {
      "displayName": "",
      "photoUrl": "",
      "userId": ""
     },
     "user_tz": 420
    },
    "id": "--MhD5M4WgMy",
    "outputId": "3f9a839a-6a67-4650-aeb3-7dda1f2db7aa",
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>TR</th>\n",
       "      <th>+DM 1</th>\n",
       "      <th>-DM 1</th>\n",
       "      <th>TR14</th>\n",
       "      <th>+DM14</th>\n",
       "      <th>-DM14</th>\n",
       "      <th>+DI14</th>\n",
       "      <th>-DI14</th>\n",
       "      <th>DI 14 Diff</th>\n",
       "      <th>DI 14 Sum</th>\n",
       "      <th>DX</th>\n",
       "      <th>ADX</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>11-Feb-09</td>\n",
       "      <td>30.20</td>\n",
       "      <td>29.41</td>\n",
       "      <td>29.87</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>12-Feb-09</td>\n",
       "      <td>30.28</td>\n",
       "      <td>29.32</td>\n",
       "      <td>30.24</td>\n",
       "      <td>0.96</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>13-Feb-09</td>\n",
       "      <td>30.45</td>\n",
       "      <td>29.96</td>\n",
       "      <td>30.10</td>\n",
       "      <td>0.48</td>\n",
       "      <td>0.17</td>\n",
       "      <td>0.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>17-Feb-09</td>\n",
       "      <td>29.35</td>\n",
       "      <td>28.74</td>\n",
       "      <td>28.90</td>\n",
       "      <td>1.36</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.22</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18-Feb-09</td>\n",
       "      <td>29.35</td>\n",
       "      <td>28.56</td>\n",
       "      <td>28.92</td>\n",
       "      <td>0.79</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.19</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>19-Feb-09</td>\n",
       "      <td>29.29</td>\n",
       "      <td>28.41</td>\n",
       "      <td>28.48</td>\n",
       "      <td>0.88</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>20-Feb-09</td>\n",
       "      <td>28.83</td>\n",
       "      <td>28.08</td>\n",
       "      <td>28.56</td>\n",
       "      <td>0.75</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.33</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>23-Feb-09</td>\n",
       "      <td>28.73</td>\n",
       "      <td>27.43</td>\n",
       "      <td>27.56</td>\n",
       "      <td>1.31</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.65</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>24-Feb-09</td>\n",
       "      <td>28.67</td>\n",
       "      <td>27.66</td>\n",
       "      <td>28.47</td>\n",
       "      <td>1.11</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>25-Feb-09</td>\n",
       "      <td>28.85</td>\n",
       "      <td>27.83</td>\n",
       "      <td>28.28</td>\n",
       "      <td>1.02</td>\n",
       "      <td>0.19</td>\n",
       "      <td>0.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>26-Feb-09</td>\n",
       "      <td>28.64</td>\n",
       "      <td>27.40</td>\n",
       "      <td>27.49</td>\n",
       "      <td>1.24</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.44</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>27-Feb-09</td>\n",
       "      <td>27.68</td>\n",
       "      <td>27.09</td>\n",
       "      <td>27.23</td>\n",
       "      <td>0.58</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2-Mar-09</td>\n",
       "      <td>27.21</td>\n",
       "      <td>26.18</td>\n",
       "      <td>26.35</td>\n",
       "      <td>1.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.91</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>3-Mar-09</td>\n",
       "      <td>26.87</td>\n",
       "      <td>26.13</td>\n",
       "      <td>26.33</td>\n",
       "      <td>0.73</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.05</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>4-Mar-09</td>\n",
       "      <td>27.41</td>\n",
       "      <td>26.63</td>\n",
       "      <td>27.03</td>\n",
       "      <td>1.08</td>\n",
       "      <td>0.54</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.33</td>\n",
       "      <td>0.90</td>\n",
       "      <td>4.32</td>\n",
       "      <td>6.75</td>\n",
       "      <td>32.42</td>\n",
       "      <td>25.67</td>\n",
       "      <td>39.17</td>\n",
       "      <td>65.54</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>5-Mar-09</td>\n",
       "      <td>26.94</td>\n",
       "      <td>26.13</td>\n",
       "      <td>26.22</td>\n",
       "      <td>0.90</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.49</td>\n",
       "      <td>13.28</td>\n",
       "      <td>0.84</td>\n",
       "      <td>4.51</td>\n",
       "      <td>6.29</td>\n",
       "      <td>33.95</td>\n",
       "      <td>27.65</td>\n",
       "      <td>40.24</td>\n",
       "      <td>68.73</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>6-Mar-09</td>\n",
       "      <td>26.52</td>\n",
       "      <td>25.43</td>\n",
       "      <td>26.01</td>\n",
       "      <td>1.09</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.70</td>\n",
       "      <td>13.42</td>\n",
       "      <td>0.78</td>\n",
       "      <td>4.89</td>\n",
       "      <td>5.78</td>\n",
       "      <td>36.43</td>\n",
       "      <td>30.65</td>\n",
       "      <td>42.21</td>\n",
       "      <td>72.60</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>9-Mar-09</td>\n",
       "      <td>26.52</td>\n",
       "      <td>25.35</td>\n",
       "      <td>25.46</td>\n",
       "      <td>1.17</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.08</td>\n",
       "      <td>13.63</td>\n",
       "      <td>0.72</td>\n",
       "      <td>4.62</td>\n",
       "      <td>5.29</td>\n",
       "      <td>33.89</td>\n",
       "      <td>28.60</td>\n",
       "      <td>39.17</td>\n",
       "      <td>73.01</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>10-Mar-09</td>\n",
       "      <td>27.09</td>\n",
       "      <td>25.88</td>\n",
       "      <td>27.03</td>\n",
       "      <td>1.63</td>\n",
       "      <td>0.57</td>\n",
       "      <td>0.00</td>\n",
       "      <td>14.29</td>\n",
       "      <td>1.24</td>\n",
       "      <td>4.29</td>\n",
       "      <td>8.70</td>\n",
       "      <td>30.02</td>\n",
       "      <td>21.32</td>\n",
       "      <td>38.71</td>\n",
       "      <td>55.06</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>11-Mar-09</td>\n",
       "      <td>27.69</td>\n",
       "      <td>26.96</td>\n",
       "      <td>27.45</td>\n",
       "      <td>0.72</td>\n",
       "      <td>0.59</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.99</td>\n",
       "      <td>1.75</td>\n",
       "      <td>3.98</td>\n",
       "      <td>12.49</td>\n",
       "      <td>28.47</td>\n",
       "      <td>15.98</td>\n",
       "      <td>40.96</td>\n",
       "      <td>39.01</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>12-Mar-09</td>\n",
       "      <td>28.45</td>\n",
       "      <td>27.14</td>\n",
       "      <td>28.36</td>\n",
       "      <td>1.31</td>\n",
       "      <td>0.76</td>\n",
       "      <td>0.00</td>\n",
       "      <td>14.30</td>\n",
       "      <td>2.38</td>\n",
       "      <td>3.70</td>\n",
       "      <td>16.68</td>\n",
       "      <td>25.87</td>\n",
       "      <td>9.19</td>\n",
       "      <td>42.55</td>\n",
       "      <td>21.60</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>13-Mar-09</td>\n",
       "      <td>28.53</td>\n",
       "      <td>28.01</td>\n",
       "      <td>28.43</td>\n",
       "      <td>0.51</td>\n",
       "      <td>0.08</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.79</td>\n",
       "      <td>2.29</td>\n",
       "      <td>3.43</td>\n",
       "      <td>16.63</td>\n",
       "      <td>24.90</td>\n",
       "      <td>8.27</td>\n",
       "      <td>41.53</td>\n",
       "      <td>19.92</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>16-Mar-09</td>\n",
       "      <td>28.67</td>\n",
       "      <td>27.88</td>\n",
       "      <td>27.95</td>\n",
       "      <td>0.78</td>\n",
       "      <td>0.14</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.59</td>\n",
       "      <td>2.27</td>\n",
       "      <td>3.19</td>\n",
       "      <td>16.69</td>\n",
       "      <td>23.47</td>\n",
       "      <td>6.78</td>\n",
       "      <td>40.16</td>\n",
       "      <td>16.87</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>17-Mar-09</td>\n",
       "      <td>29.01</td>\n",
       "      <td>27.99</td>\n",
       "      <td>29.01</td>\n",
       "      <td>1.06</td>\n",
       "      <td>0.35</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.67</td>\n",
       "      <td>2.45</td>\n",
       "      <td>2.96</td>\n",
       "      <td>17.93</td>\n",
       "      <td>21.65</td>\n",
       "      <td>3.72</td>\n",
       "      <td>39.59</td>\n",
       "      <td>9.40</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>18-Mar-09</td>\n",
       "      <td>29.87</td>\n",
       "      <td>28.76</td>\n",
       "      <td>29.38</td>\n",
       "      <td>1.11</td>\n",
       "      <td>0.86</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.80</td>\n",
       "      <td>3.14</td>\n",
       "      <td>2.75</td>\n",
       "      <td>22.73</td>\n",
       "      <td>19.92</td>\n",
       "      <td>2.81</td>\n",
       "      <td>42.64</td>\n",
       "      <td>6.59</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>19-Mar-09</td>\n",
       "      <td>29.80</td>\n",
       "      <td>29.14</td>\n",
       "      <td>29.36</td>\n",
       "      <td>0.66</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.48</td>\n",
       "      <td>2.91</td>\n",
       "      <td>2.55</td>\n",
       "      <td>21.61</td>\n",
       "      <td>18.94</td>\n",
       "      <td>2.67</td>\n",
       "      <td>40.55</td>\n",
       "      <td>6.59</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>20-Mar-09</td>\n",
       "      <td>29.75</td>\n",
       "      <td>28.71</td>\n",
       "      <td>28.91</td>\n",
       "      <td>1.04</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.43</td>\n",
       "      <td>13.56</td>\n",
       "      <td>2.71</td>\n",
       "      <td>2.80</td>\n",
       "      <td>19.95</td>\n",
       "      <td>20.64</td>\n",
       "      <td>0.68</td>\n",
       "      <td>40.59</td>\n",
       "      <td>1.69</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>23-Mar-09</td>\n",
       "      <td>30.65</td>\n",
       "      <td>28.93</td>\n",
       "      <td>30.61</td>\n",
       "      <td>1.74</td>\n",
       "      <td>0.90</td>\n",
       "      <td>0.00</td>\n",
       "      <td>14.33</td>\n",
       "      <td>3.41</td>\n",
       "      <td>2.60</td>\n",
       "      <td>23.82</td>\n",
       "      <td>18.13</td>\n",
       "      <td>5.69</td>\n",
       "      <td>41.94</td>\n",
       "      <td>13.57</td>\n",
       "      <td>33.58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>24-Mar-09</td>\n",
       "      <td>30.60</td>\n",
       "      <td>30.03</td>\n",
       "      <td>30.05</td>\n",
       "      <td>0.58</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>13.89</td>\n",
       "      <td>3.17</td>\n",
       "      <td>2.41</td>\n",
       "      <td>22.81</td>\n",
       "      <td>17.36</td>\n",
       "      <td>5.45</td>\n",
       "      <td>40.18</td>\n",
       "      <td>13.57</td>\n",
       "      <td>32.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>25-Mar-09</td>\n",
       "      <td>30.76</td>\n",
       "      <td>29.39</td>\n",
       "      <td>30.19</td>\n",
       "      <td>1.38</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.64</td>\n",
       "      <td>14.28</td>\n",
       "      <td>2.94</td>\n",
       "      <td>2.88</td>\n",
       "      <td>20.61</td>\n",
       "      <td>20.20</td>\n",
       "      <td>0.41</td>\n",
       "      <td>40.81</td>\n",
       "      <td>1.01</td>\n",
       "      <td>29.93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>474</th>\n",
       "      <td>29-Dec-10</td>\n",
       "      <td>54.90</td>\n",
       "      <td>54.73</td>\n",
       "      <td>54.79</td>\n",
       "      <td>0.23</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.33</td>\n",
       "      <td>1.47</td>\n",
       "      <td>1.44</td>\n",
       "      <td>20.05</td>\n",
       "      <td>19.67</td>\n",
       "      <td>0.39</td>\n",
       "      <td>39.72</td>\n",
       "      <td>0.97</td>\n",
       "      <td>15.42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>475</th>\n",
       "      <td>30-Dec-10</td>\n",
       "      <td>54.80</td>\n",
       "      <td>54.55</td>\n",
       "      <td>54.66</td>\n",
       "      <td>0.25</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.18</td>\n",
       "      <td>7.06</td>\n",
       "      <td>1.37</td>\n",
       "      <td>1.52</td>\n",
       "      <td>19.34</td>\n",
       "      <td>21.52</td>\n",
       "      <td>2.18</td>\n",
       "      <td>40.86</td>\n",
       "      <td>5.33</td>\n",
       "      <td>14.70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>476</th>\n",
       "      <td>31-Dec-10</td>\n",
       "      <td>54.62</td>\n",
       "      <td>54.21</td>\n",
       "      <td>54.46</td>\n",
       "      <td>0.45</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.34</td>\n",
       "      <td>7.00</td>\n",
       "      <td>1.27</td>\n",
       "      <td>1.75</td>\n",
       "      <td>18.10</td>\n",
       "      <td>24.99</td>\n",
       "      <td>6.89</td>\n",
       "      <td>43.09</td>\n",
       "      <td>16.00</td>\n",
       "      <td>14.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>477</th>\n",
       "      <td>3-Jan-11</td>\n",
       "      <td>55.69</td>\n",
       "      <td>54.95</td>\n",
       "      <td>55.31</td>\n",
       "      <td>1.23</td>\n",
       "      <td>1.07</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.73</td>\n",
       "      <td>2.25</td>\n",
       "      <td>1.63</td>\n",
       "      <td>29.06</td>\n",
       "      <td>21.02</td>\n",
       "      <td>8.04</td>\n",
       "      <td>50.07</td>\n",
       "      <td>16.06</td>\n",
       "      <td>14.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>478</th>\n",
       "      <td>4-Jan-11</td>\n",
       "      <td>55.55</td>\n",
       "      <td>54.92</td>\n",
       "      <td>55.27</td>\n",
       "      <td>0.63</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.03</td>\n",
       "      <td>7.81</td>\n",
       "      <td>2.09</td>\n",
       "      <td>1.54</td>\n",
       "      <td>26.71</td>\n",
       "      <td>19.71</td>\n",
       "      <td>7.01</td>\n",
       "      <td>46.42</td>\n",
       "      <td>15.10</td>\n",
       "      <td>14.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>479</th>\n",
       "      <td>5-Jan-11</td>\n",
       "      <td>55.76</td>\n",
       "      <td>55.07</td>\n",
       "      <td>55.74</td>\n",
       "      <td>0.69</td>\n",
       "      <td>0.21</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.94</td>\n",
       "      <td>2.15</td>\n",
       "      <td>1.43</td>\n",
       "      <td>27.04</td>\n",
       "      <td>17.99</td>\n",
       "      <td>9.04</td>\n",
       "      <td>45.03</td>\n",
       "      <td>20.08</td>\n",
       "      <td>15.27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>480</th>\n",
       "      <td>6-Jan-11</td>\n",
       "      <td>55.96</td>\n",
       "      <td>55.68</td>\n",
       "      <td>55.92</td>\n",
       "      <td>0.28</td>\n",
       "      <td>0.20</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.66</td>\n",
       "      <td>2.19</td>\n",
       "      <td>1.33</td>\n",
       "      <td>28.66</td>\n",
       "      <td>17.34</td>\n",
       "      <td>11.32</td>\n",
       "      <td>46.00</td>\n",
       "      <td>24.62</td>\n",
       "      <td>15.93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>481</th>\n",
       "      <td>7-Jan-11</td>\n",
       "      <td>56.05</td>\n",
       "      <td>55.32</td>\n",
       "      <td>55.87</td>\n",
       "      <td>0.73</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.36</td>\n",
       "      <td>7.84</td>\n",
       "      <td>2.04</td>\n",
       "      <td>1.59</td>\n",
       "      <td>25.99</td>\n",
       "      <td>20.31</td>\n",
       "      <td>5.68</td>\n",
       "      <td>46.30</td>\n",
       "      <td>12.26</td>\n",
       "      <td>15.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>482</th>\n",
       "      <td>10-Jan-11</td>\n",
       "      <td>56.18</td>\n",
       "      <td>55.58</td>\n",
       "      <td>56.08</td>\n",
       "      <td>0.60</td>\n",
       "      <td>0.13</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.88</td>\n",
       "      <td>2.02</td>\n",
       "      <td>1.48</td>\n",
       "      <td>25.66</td>\n",
       "      <td>18.77</td>\n",
       "      <td>6.89</td>\n",
       "      <td>44.43</td>\n",
       "      <td>15.52</td>\n",
       "      <td>15.66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>483</th>\n",
       "      <td>11-Jan-11</td>\n",
       "      <td>56.36</td>\n",
       "      <td>55.95</td>\n",
       "      <td>56.16</td>\n",
       "      <td>0.41</td>\n",
       "      <td>0.18</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.73</td>\n",
       "      <td>2.06</td>\n",
       "      <td>1.37</td>\n",
       "      <td>26.63</td>\n",
       "      <td>17.77</td>\n",
       "      <td>8.86</td>\n",
       "      <td>44.40</td>\n",
       "      <td>19.95</td>\n",
       "      <td>15.97</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>484</th>\n",
       "      <td>12-Jan-11</td>\n",
       "      <td>56.56</td>\n",
       "      <td>56.20</td>\n",
       "      <td>56.56</td>\n",
       "      <td>0.40</td>\n",
       "      <td>0.20</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.57</td>\n",
       "      <td>2.11</td>\n",
       "      <td>1.27</td>\n",
       "      <td>27.86</td>\n",
       "      <td>16.83</td>\n",
       "      <td>11.03</td>\n",
       "      <td>44.70</td>\n",
       "      <td>24.68</td>\n",
       "      <td>16.59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>485</th>\n",
       "      <td>13-Jan-11</td>\n",
       "      <td>56.73</td>\n",
       "      <td>56.41</td>\n",
       "      <td>56.58</td>\n",
       "      <td>0.32</td>\n",
       "      <td>0.17</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.35</td>\n",
       "      <td>2.13</td>\n",
       "      <td>1.18</td>\n",
       "      <td>28.96</td>\n",
       "      <td>16.10</td>\n",
       "      <td>12.86</td>\n",
       "      <td>45.06</td>\n",
       "      <td>28.54</td>\n",
       "      <td>17.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>486</th>\n",
       "      <td>14-Jan-11</td>\n",
       "      <td>57.02</td>\n",
       "      <td>56.46</td>\n",
       "      <td>57.00</td>\n",
       "      <td>0.56</td>\n",
       "      <td>0.29</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.39</td>\n",
       "      <td>2.27</td>\n",
       "      <td>1.10</td>\n",
       "      <td>30.69</td>\n",
       "      <td>14.88</td>\n",
       "      <td>15.81</td>\n",
       "      <td>45.57</td>\n",
       "      <td>34.70</td>\n",
       "      <td>18.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>487</th>\n",
       "      <td>18-Jan-11</td>\n",
       "      <td>57.23</td>\n",
       "      <td>56.49</td>\n",
       "      <td>57.16</td>\n",
       "      <td>0.74</td>\n",
       "      <td>0.21</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.60</td>\n",
       "      <td>2.32</td>\n",
       "      <td>1.02</td>\n",
       "      <td>30.47</td>\n",
       "      <td>13.43</td>\n",
       "      <td>17.04</td>\n",
       "      <td>43.90</td>\n",
       "      <td>38.81</td>\n",
       "      <td>20.11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>488</th>\n",
       "      <td>19-Jan-11</td>\n",
       "      <td>57.26</td>\n",
       "      <td>56.32</td>\n",
       "      <td>56.51</td>\n",
       "      <td>0.94</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.17</td>\n",
       "      <td>8.00</td>\n",
       "      <td>2.15</td>\n",
       "      <td>1.12</td>\n",
       "      <td>26.89</td>\n",
       "      <td>13.98</td>\n",
       "      <td>12.91</td>\n",
       "      <td>40.86</td>\n",
       "      <td>31.59</td>\n",
       "      <td>20.93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>489</th>\n",
       "      <td>20-Jan-11</td>\n",
       "      <td>56.35</td>\n",
       "      <td>55.68</td>\n",
       "      <td>56.11</td>\n",
       "      <td>0.83</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.64</td>\n",
       "      <td>8.26</td>\n",
       "      <td>2.00</td>\n",
       "      <td>1.68</td>\n",
       "      <td>24.18</td>\n",
       "      <td>20.32</td>\n",
       "      <td>3.86</td>\n",
       "      <td>44.51</td>\n",
       "      <td>8.67</td>\n",
       "      <td>20.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>490</th>\n",
       "      <td>21-Jan-11</td>\n",
       "      <td>56.49</td>\n",
       "      <td>55.65</td>\n",
       "      <td>55.68</td>\n",
       "      <td>0.84</td>\n",
       "      <td>0.14</td>\n",
       "      <td>0.00</td>\n",
       "      <td>8.51</td>\n",
       "      <td>1.99</td>\n",
       "      <td>1.56</td>\n",
       "      <td>23.44</td>\n",
       "      <td>18.32</td>\n",
       "      <td>5.12</td>\n",
       "      <td>41.76</td>\n",
       "      <td>12.27</td>\n",
       "      <td>19.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>491</th>\n",
       "      <td>24-Jan-11</td>\n",
       "      <td>56.46</td>\n",
       "      <td>55.68</td>\n",
       "      <td>56.45</td>\n",
       "      <td>0.78</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>8.68</td>\n",
       "      <td>1.85</td>\n",
       "      <td>1.45</td>\n",
       "      <td>21.33</td>\n",
       "      <td>16.67</td>\n",
       "      <td>4.66</td>\n",
       "      <td>38.01</td>\n",
       "      <td>12.27</td>\n",
       "      <td>18.99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>492</th>\n",
       "      <td>25-Jan-11</td>\n",
       "      <td>56.55</td>\n",
       "      <td>56.05</td>\n",
       "      <td>56.53</td>\n",
       "      <td>0.50</td>\n",
       "      <td>0.09</td>\n",
       "      <td>0.00</td>\n",
       "      <td>8.56</td>\n",
       "      <td>1.81</td>\n",
       "      <td>1.34</td>\n",
       "      <td>21.14</td>\n",
       "      <td>15.70</td>\n",
       "      <td>5.44</td>\n",
       "      <td>36.84</td>\n",
       "      <td>14.77</td>\n",
       "      <td>18.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>493</th>\n",
       "      <td>26-Jan-11</td>\n",
       "      <td>56.98</td>\n",
       "      <td>56.45</td>\n",
       "      <td>56.83</td>\n",
       "      <td>0.53</td>\n",
       "      <td>0.43</td>\n",
       "      <td>0.00</td>\n",
       "      <td>8.48</td>\n",
       "      <td>2.11</td>\n",
       "      <td>1.25</td>\n",
       "      <td>24.89</td>\n",
       "      <td>14.72</td>\n",
       "      <td>10.17</td>\n",
       "      <td>39.61</td>\n",
       "      <td>25.69</td>\n",
       "      <td>19.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>494</th>\n",
       "      <td>27-Jan-11</td>\n",
       "      <td>57.35</td>\n",
       "      <td>56.92</td>\n",
       "      <td>57.18</td>\n",
       "      <td>0.52</td>\n",
       "      <td>0.37</td>\n",
       "      <td>0.00</td>\n",
       "      <td>8.39</td>\n",
       "      <td>2.33</td>\n",
       "      <td>1.16</td>\n",
       "      <td>27.76</td>\n",
       "      <td>13.80</td>\n",
       "      <td>13.95</td>\n",
       "      <td>41.56</td>\n",
       "      <td>33.57</td>\n",
       "      <td>20.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>495</th>\n",
       "      <td>28-Jan-11</td>\n",
       "      <td>57.22</td>\n",
       "      <td>55.47</td>\n",
       "      <td>55.73</td>\n",
       "      <td>1.75</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.45</td>\n",
       "      <td>9.54</td>\n",
       "      <td>2.16</td>\n",
       "      <td>2.53</td>\n",
       "      <td>22.67</td>\n",
       "      <td>26.47</td>\n",
       "      <td>3.80</td>\n",
       "      <td>49.13</td>\n",
       "      <td>7.74</td>\n",
       "      <td>19.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>496</th>\n",
       "      <td>31-Jan-11</td>\n",
       "      <td>56.16</td>\n",
       "      <td>55.39</td>\n",
       "      <td>56.00</td>\n",
       "      <td>0.77</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.08</td>\n",
       "      <td>9.63</td>\n",
       "      <td>2.01</td>\n",
       "      <td>2.43</td>\n",
       "      <td>20.85</td>\n",
       "      <td>25.18</td>\n",
       "      <td>4.33</td>\n",
       "      <td>46.04</td>\n",
       "      <td>9.40</td>\n",
       "      <td>18.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>497</th>\n",
       "      <td>1-Feb-11</td>\n",
       "      <td>57.18</td>\n",
       "      <td>56.36</td>\n",
       "      <td>57.05</td>\n",
       "      <td>1.18</td>\n",
       "      <td>1.02</td>\n",
       "      <td>0.00</td>\n",
       "      <td>10.12</td>\n",
       "      <td>2.89</td>\n",
       "      <td>2.25</td>\n",
       "      <td>28.50</td>\n",
       "      <td>22.25</td>\n",
       "      <td>6.25</td>\n",
       "      <td>50.75</td>\n",
       "      <td>12.32</td>\n",
       "      <td>18.16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>498</th>\n",
       "      <td>2-Feb-11</td>\n",
       "      <td>57.17</td>\n",
       "      <td>56.84</td>\n",
       "      <td>56.96</td>\n",
       "      <td>0.33</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.73</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.09</td>\n",
       "      <td>27.53</td>\n",
       "      <td>21.49</td>\n",
       "      <td>6.04</td>\n",
       "      <td>49.03</td>\n",
       "      <td>12.32</td>\n",
       "      <td>17.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>499</th>\n",
       "      <td>3-Feb-11</td>\n",
       "      <td>57.14</td>\n",
       "      <td>56.40</td>\n",
       "      <td>57.06</td>\n",
       "      <td>0.74</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.44</td>\n",
       "      <td>9.77</td>\n",
       "      <td>2.49</td>\n",
       "      <td>2.38</td>\n",
       "      <td>25.45</td>\n",
       "      <td>24.37</td>\n",
       "      <td>1.08</td>\n",
       "      <td>49.82</td>\n",
       "      <td>2.17</td>\n",
       "      <td>16.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>500</th>\n",
       "      <td>4-Feb-11</td>\n",
       "      <td>57.42</td>\n",
       "      <td>56.90</td>\n",
       "      <td>57.38</td>\n",
       "      <td>0.52</td>\n",
       "      <td>0.28</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.60</td>\n",
       "      <td>2.59</td>\n",
       "      <td>2.21</td>\n",
       "      <td>26.99</td>\n",
       "      <td>23.05</td>\n",
       "      <td>3.94</td>\n",
       "      <td>50.03</td>\n",
       "      <td>7.88</td>\n",
       "      <td>16.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>501</th>\n",
       "      <td>7-Feb-11</td>\n",
       "      <td>57.97</td>\n",
       "      <td>57.40</td>\n",
       "      <td>57.65</td>\n",
       "      <td>0.59</td>\n",
       "      <td>0.55</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.51</td>\n",
       "      <td>2.95</td>\n",
       "      <td>2.05</td>\n",
       "      <td>31.08</td>\n",
       "      <td>21.60</td>\n",
       "      <td>9.48</td>\n",
       "      <td>52.69</td>\n",
       "      <td>17.99</td>\n",
       "      <td>16.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>502</th>\n",
       "      <td>8-Feb-11</td>\n",
       "      <td>58.07</td>\n",
       "      <td>57.56</td>\n",
       "      <td>58.03</td>\n",
       "      <td>0.51</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.34</td>\n",
       "      <td>2.84</td>\n",
       "      <td>1.91</td>\n",
       "      <td>30.46</td>\n",
       "      <td>20.42</td>\n",
       "      <td>10.03</td>\n",
       "      <td>50.88</td>\n",
       "      <td>19.72</td>\n",
       "      <td>16.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>503</th>\n",
       "      <td>9-Feb-11</td>\n",
       "      <td>58.12</td>\n",
       "      <td>57.75</td>\n",
       "      <td>57.93</td>\n",
       "      <td>0.37</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.04</td>\n",
       "      <td>2.69</td>\n",
       "      <td>1.77</td>\n",
       "      <td>29.76</td>\n",
       "      <td>19.59</td>\n",
       "      <td>10.18</td>\n",
       "      <td>49.35</td>\n",
       "      <td>20.62</td>\n",
       "      <td>16.71</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>504 rows × 16 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          Date   High    Low  Close    TR  +DM 1  -DM 1   TR14  +DM14  -DM14  \\\n",
       "0    11-Feb-09  30.20  29.41  29.87   NaN    NaN    NaN    NaN    NaN    NaN   \n",
       "1    12-Feb-09  30.28  29.32  30.24  0.96   0.00   0.09    NaN    NaN    NaN   \n",
       "2    13-Feb-09  30.45  29.96  30.10  0.48   0.17   0.00    NaN    NaN    NaN   \n",
       "3    17-Feb-09  29.35  28.74  28.90  1.36   0.00   1.22    NaN    NaN    NaN   \n",
       "4    18-Feb-09  29.35  28.56  28.92  0.79   0.00   0.19    NaN    NaN    NaN   \n",
       "5    19-Feb-09  29.29  28.41  28.48  0.88   0.00   0.15    NaN    NaN    NaN   \n",
       "6    20-Feb-09  28.83  28.08  28.56  0.75   0.00   0.33    NaN    NaN    NaN   \n",
       "7    23-Feb-09  28.73  27.43  27.56  1.31   0.00   0.65    NaN    NaN    NaN   \n",
       "8    24-Feb-09  28.67  27.66  28.47  1.11   0.00   0.00    NaN    NaN    NaN   \n",
       "9    25-Feb-09  28.85  27.83  28.28  1.02   0.19   0.00    NaN    NaN    NaN   \n",
       "10   26-Feb-09  28.64  27.40  27.49  1.24   0.00   0.44    NaN    NaN    NaN   \n",
       "11   27-Feb-09  27.68  27.09  27.23  0.58   0.00   0.31    NaN    NaN    NaN   \n",
       "12    2-Mar-09  27.21  26.18  26.35  1.05   0.00   0.91    NaN    NaN    NaN   \n",
       "13    3-Mar-09  26.87  26.13  26.33  0.73   0.00   0.05    NaN    NaN    NaN   \n",
       "14    4-Mar-09  27.41  26.63  27.03  1.08   0.54   0.00  13.33   0.90   4.32   \n",
       "15    5-Mar-09  26.94  26.13  26.22  0.90   0.00   0.49  13.28   0.84   4.51   \n",
       "16    6-Mar-09  26.52  25.43  26.01  1.09   0.00   0.70  13.42   0.78   4.89   \n",
       "17    9-Mar-09  26.52  25.35  25.46  1.17   0.00   0.08  13.63   0.72   4.62   \n",
       "18   10-Mar-09  27.09  25.88  27.03  1.63   0.57   0.00  14.29   1.24   4.29   \n",
       "19   11-Mar-09  27.69  26.96  27.45  0.72   0.59   0.00  13.99   1.75   3.98   \n",
       "20   12-Mar-09  28.45  27.14  28.36  1.31   0.76   0.00  14.30   2.38   3.70   \n",
       "21   13-Mar-09  28.53  28.01  28.43  0.51   0.08   0.00  13.79   2.29   3.43   \n",
       "22   16-Mar-09  28.67  27.88  27.95  0.78   0.14   0.00  13.59   2.27   3.19   \n",
       "23   17-Mar-09  29.01  27.99  29.01  1.06   0.35   0.00  13.67   2.45   2.96   \n",
       "24   18-Mar-09  29.87  28.76  29.38  1.11   0.86   0.00  13.80   3.14   2.75   \n",
       "25   19-Mar-09  29.80  29.14  29.36  0.66   0.00   0.00  13.48   2.91   2.55   \n",
       "26   20-Mar-09  29.75  28.71  28.91  1.04   0.00   0.43  13.56   2.71   2.80   \n",
       "27   23-Mar-09  30.65  28.93  30.61  1.74   0.90   0.00  14.33   3.41   2.60   \n",
       "28   24-Mar-09  30.60  30.03  30.05  0.58   0.00   0.00  13.89   3.17   2.41   \n",
       "29   25-Mar-09  30.76  29.39  30.19  1.38   0.00   0.64  14.28   2.94   2.88   \n",
       "..         ...    ...    ...    ...   ...    ...    ...    ...    ...    ...   \n",
       "474  29-Dec-10  54.90  54.73  54.79  0.23   0.00   0.00   7.33   1.47   1.44   \n",
       "475  30-Dec-10  54.80  54.55  54.66  0.25   0.00   0.18   7.06   1.37   1.52   \n",
       "476  31-Dec-10  54.62  54.21  54.46  0.45   0.00   0.34   7.00   1.27   1.75   \n",
       "477   3-Jan-11  55.69  54.95  55.31  1.23   1.07   0.00   7.73   2.25   1.63   \n",
       "478   4-Jan-11  55.55  54.92  55.27  0.63   0.00   0.03   7.81   2.09   1.54   \n",
       "479   5-Jan-11  55.76  55.07  55.74  0.69   0.21   0.00   7.94   2.15   1.43   \n",
       "480   6-Jan-11  55.96  55.68  55.92  0.28   0.20   0.00   7.66   2.19   1.33   \n",
       "481   7-Jan-11  56.05  55.32  55.87  0.73   0.00   0.36   7.84   2.04   1.59   \n",
       "482  10-Jan-11  56.18  55.58  56.08  0.60   0.13   0.00   7.88   2.02   1.48   \n",
       "483  11-Jan-11  56.36  55.95  56.16  0.41   0.18   0.00   7.73   2.06   1.37   \n",
       "484  12-Jan-11  56.56  56.20  56.56  0.40   0.20   0.00   7.57   2.11   1.27   \n",
       "485  13-Jan-11  56.73  56.41  56.58  0.32   0.17   0.00   7.35   2.13   1.18   \n",
       "486  14-Jan-11  57.02  56.46  57.00  0.56   0.29   0.00   7.39   2.27   1.10   \n",
       "487  18-Jan-11  57.23  56.49  57.16  0.74   0.21   0.00   7.60   2.32   1.02   \n",
       "488  19-Jan-11  57.26  56.32  56.51  0.94   0.00   0.17   8.00   2.15   1.12   \n",
       "489  20-Jan-11  56.35  55.68  56.11  0.83   0.00   0.64   8.26   2.00   1.68   \n",
       "490  21-Jan-11  56.49  55.65  55.68  0.84   0.14   0.00   8.51   1.99   1.56   \n",
       "491  24-Jan-11  56.46  55.68  56.45  0.78   0.00   0.00   8.68   1.85   1.45   \n",
       "492  25-Jan-11  56.55  56.05  56.53  0.50   0.09   0.00   8.56   1.81   1.34   \n",
       "493  26-Jan-11  56.98  56.45  56.83  0.53   0.43   0.00   8.48   2.11   1.25   \n",
       "494  27-Jan-11  57.35  56.92  57.18  0.52   0.37   0.00   8.39   2.33   1.16   \n",
       "495  28-Jan-11  57.22  55.47  55.73  1.75   0.00   1.45   9.54   2.16   2.53   \n",
       "496  31-Jan-11  56.16  55.39  56.00  0.77   0.00   0.08   9.63   2.01   2.43   \n",
       "497   1-Feb-11  57.18  56.36  57.05  1.18   1.02   0.00  10.12   2.89   2.25   \n",
       "498   2-Feb-11  57.17  56.84  56.96  0.33   0.00   0.00   9.73   2.68   2.09   \n",
       "499   3-Feb-11  57.14  56.40  57.06  0.74   0.00   0.44   9.77   2.49   2.38   \n",
       "500   4-Feb-11  57.42  56.90  57.38  0.52   0.28   0.00   9.60   2.59   2.21   \n",
       "501   7-Feb-11  57.97  57.40  57.65  0.59   0.55   0.00   9.51   2.95   2.05   \n",
       "502   8-Feb-11  58.07  57.56  58.03  0.51   0.10   0.00   9.34   2.84   1.91   \n",
       "503   9-Feb-11  58.12  57.75  57.93  0.37   0.05   0.00   9.04   2.69   1.77   \n",
       "\n",
       "     +DI14  -DI14  DI 14 Diff  DI 14 Sum     DX    ADX  \n",
       "0      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "1      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "2      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "3      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "4      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "5      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "6      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "7      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "8      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "9      NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "10     NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "11     NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "12     NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "13     NaN    NaN         NaN        NaN    NaN    NaN  \n",
       "14    6.75  32.42       25.67      39.17  65.54    NaN  \n",
       "15    6.29  33.95       27.65      40.24  68.73    NaN  \n",
       "16    5.78  36.43       30.65      42.21  72.60    NaN  \n",
       "17    5.29  33.89       28.60      39.17  73.01    NaN  \n",
       "18    8.70  30.02       21.32      38.71  55.06    NaN  \n",
       "19   12.49  28.47       15.98      40.96  39.01    NaN  \n",
       "20   16.68  25.87        9.19      42.55  21.60    NaN  \n",
       "21   16.63  24.90        8.27      41.53  19.92    NaN  \n",
       "22   16.69  23.47        6.78      40.16  16.87    NaN  \n",
       "23   17.93  21.65        3.72      39.59   9.40    NaN  \n",
       "24   22.73  19.92        2.81      42.64   6.59    NaN  \n",
       "25   21.61  18.94        2.67      40.55   6.59    NaN  \n",
       "26   19.95  20.64        0.68      40.59   1.69    NaN  \n",
       "27   23.82  18.13        5.69      41.94  13.57  33.58  \n",
       "28   22.81  17.36        5.45      40.18  13.57  32.15  \n",
       "29   20.61  20.20        0.41      40.81   1.01  29.93  \n",
       "..     ...    ...         ...        ...    ...    ...  \n",
       "474  20.05  19.67        0.39      39.72   0.97  15.42  \n",
       "475  19.34  21.52        2.18      40.86   5.33  14.70  \n",
       "476  18.10  24.99        6.89      43.09  16.00  14.79  \n",
       "477  29.06  21.02        8.04      50.07  16.06  14.88  \n",
       "478  26.71  19.71        7.01      46.42  15.10  14.90  \n",
       "479  27.04  17.99        9.04      45.03  20.08  15.27  \n",
       "480  28.66  17.34       11.32      46.00  24.62  15.93  \n",
       "481  25.99  20.31        5.68      46.30  12.26  15.67  \n",
       "482  25.66  18.77        6.89      44.43  15.52  15.66  \n",
       "483  26.63  17.77        8.86      44.40  19.95  15.97  \n",
       "484  27.86  16.83       11.03      44.70  24.68  16.59  \n",
       "485  28.96  16.10       12.86      45.06  28.54  17.44  \n",
       "486  30.69  14.88       15.81      45.57  34.70  18.68  \n",
       "487  30.47  13.43       17.04      43.90  38.81  20.11  \n",
       "488  26.89  13.98       12.91      40.86  31.59  20.93  \n",
       "489  24.18  20.32        3.86      44.51   8.67  20.06  \n",
       "490  23.44  18.32        5.12      41.76  12.27  19.50  \n",
       "491  21.33  16.67        4.66      38.01  12.27  18.99  \n",
       "492  21.14  15.70        5.44      36.84  14.77  18.68  \n",
       "493  24.89  14.72       10.17      39.61  25.69  19.18  \n",
       "494  27.76  13.80       13.95      41.56  33.57  20.21  \n",
       "495  22.67  26.47        3.80      49.13   7.74  19.32  \n",
       "496  20.85  25.18        4.33      46.04   9.40  18.61  \n",
       "497  28.50  22.25        6.25      50.75  12.32  18.16  \n",
       "498  27.53  21.49        6.04      49.03  12.32  17.75  \n",
       "499  25.45  24.37        1.08      49.82   2.17  16.63  \n",
       "500  26.99  23.05        3.94      50.03   7.88  16.01  \n",
       "501  31.08  21.60        9.48      52.69  17.99  16.15  \n",
       "502  30.46  20.42       10.03      50.88  19.72  16.40  \n",
       "503  29.76  19.59       10.18      49.35  20.62  16.71  \n",
       "\n",
       "[504 rows x 16 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(series)\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "../ta/trend.py:170: RuntimeWarning: invalid value encountered in double_scalars\n",
      "  dip[i] = 100 * (dip_mio[i]/trs[i])\n",
      "../ta/trend.py:174: RuntimeWarning: invalid value encountered in double_scalars\n",
      "  din[i] = 100 * (din_mio[i]/trs[i])\n"
     ]
    }
   ],
   "source": [
    "df['adx_pos']=trend.adx_pos( df['High'], df['Low'], df['Close'], n=14, fillna=True)\n",
    "df['adx_neg']=trend.adx_neg(df['High'], df['Low'], df['Close'], n=14, fillna=True)\n",
    "df['adx']=trend.adx(df['High'], df['Low'], df['Close'], n=14,fillna=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>+DI14</th>\n",
       "      <th>adx_pos</th>\n",
       "      <th>-DI14</th>\n",
       "      <th>adx_neg</th>\n",
       "      <th>ADX</th>\n",
       "      <th>adx</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>11-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>12-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>13-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>17-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>19-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>20-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>23-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>24-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>25-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>26-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>27-Feb-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2-Mar-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>3-Mar-09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>4-Mar-09</td>\n",
       "      <td>6.75</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>32.42</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>5-Mar-09</td>\n",
       "      <td>6.29</td>\n",
       "      <td>6.211080</td>\n",
       "      <td>33.95</td>\n",
       "      <td>33.905948</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>6-Mar-09</td>\n",
       "      <td>5.78</td>\n",
       "      <td>5.707553</td>\n",
       "      <td>36.43</td>\n",
       "      <td>36.363498</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>9-Mar-09</td>\n",
       "      <td>5.29</td>\n",
       "      <td>5.218511</td>\n",
       "      <td>33.89</td>\n",
       "      <td>33.833621</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>10-Mar-09</td>\n",
       "      <td>8.70</td>\n",
       "      <td>8.607418</td>\n",
       "      <td>30.02</td>\n",
       "      <td>29.979642</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>11-Mar-09</td>\n",
       "      <td>12.49</td>\n",
       "      <td>12.439537</td>\n",
       "      <td>28.47</td>\n",
       "      <td>28.418365</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>12-Mar-09</td>\n",
       "      <td>16.68</td>\n",
       "      <td>16.607016</td>\n",
       "      <td>25.87</td>\n",
       "      <td>25.819768</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>13-Mar-09</td>\n",
       "      <td>16.63</td>\n",
       "      <td>16.561031</td>\n",
       "      <td>24.90</td>\n",
       "      <td>24.848462</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>16-Mar-09</td>\n",
       "      <td>16.69</td>\n",
       "      <td>16.628316</td>\n",
       "      <td>23.47</td>\n",
       "      <td>23.407767</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>17-Mar-09</td>\n",
       "      <td>17.93</td>\n",
       "      <td>17.822424</td>\n",
       "      <td>21.65</td>\n",
       "      <td>21.598281</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>18-Mar-09</td>\n",
       "      <td>22.73</td>\n",
       "      <td>22.605910</td>\n",
       "      <td>19.92</td>\n",
       "      <td>19.866406</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>19-Mar-09</td>\n",
       "      <td>21.61</td>\n",
       "      <td>21.501883</td>\n",
       "      <td>18.94</td>\n",
       "      <td>18.896172</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>20-Mar-09</td>\n",
       "      <td>19.95</td>\n",
       "      <td>19.856265</td>\n",
       "      <td>20.64</td>\n",
       "      <td>20.614351</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>23-Mar-09</td>\n",
       "      <td>23.82</td>\n",
       "      <td>23.718187</td>\n",
       "      <td>18.13</td>\n",
       "      <td>18.116193</td>\n",
       "      <td>33.58</td>\n",
       "      <td>33.707888</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>24-Mar-09</td>\n",
       "      <td>22.81</td>\n",
       "      <td>22.729402</td>\n",
       "      <td>17.36</td>\n",
       "      <td>17.360949</td>\n",
       "      <td>32.15</td>\n",
       "      <td>32.256674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>25-Mar-09</td>\n",
       "      <td>20.61</td>\n",
       "      <td>20.550127</td>\n",
       "      <td>20.20</td>\n",
       "      <td>20.175421</td>\n",
       "      <td>29.93</td>\n",
       "      <td>30.018346</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>474</th>\n",
       "      <td>29-Dec-10</td>\n",
       "      <td>20.05</td>\n",
       "      <td>20.021345</td>\n",
       "      <td>19.67</td>\n",
       "      <td>19.655591</td>\n",
       "      <td>15.42</td>\n",
       "      <td>15.375191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>475</th>\n",
       "      <td>30-Dec-10</td>\n",
       "      <td>19.34</td>\n",
       "      <td>19.312610</td>\n",
       "      <td>21.52</td>\n",
       "      <td>21.508529</td>\n",
       "      <td>14.70</td>\n",
       "      <td>14.661203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>476</th>\n",
       "      <td>31-Dec-10</td>\n",
       "      <td>18.10</td>\n",
       "      <td>18.072484</td>\n",
       "      <td>24.99</td>\n",
       "      <td>24.979065</td>\n",
       "      <td>14.79</td>\n",
       "      <td>14.759873</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>477</th>\n",
       "      <td>3-Jan-11</td>\n",
       "      <td>29.06</td>\n",
       "      <td>29.028563</td>\n",
       "      <td>21.02</td>\n",
       "      <td>21.008156</td>\n",
       "      <td>14.88</td>\n",
       "      <td>14.850528</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>478</th>\n",
       "      <td>4-Jan-11</td>\n",
       "      <td>26.71</td>\n",
       "      <td>26.688349</td>\n",
       "      <td>19.71</td>\n",
       "      <td>19.698422</td>\n",
       "      <td>14.90</td>\n",
       "      <td>14.866119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>479</th>\n",
       "      <td>5-Jan-11</td>\n",
       "      <td>27.04</td>\n",
       "      <td>27.013655</td>\n",
       "      <td>17.99</td>\n",
       "      <td>17.987989</td>\n",
       "      <td>15.27</td>\n",
       "      <td>15.236846</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>480</th>\n",
       "      <td>6-Jan-11</td>\n",
       "      <td>28.66</td>\n",
       "      <td>28.637416</td>\n",
       "      <td>17.34</td>\n",
       "      <td>17.330368</td>\n",
       "      <td>15.93</td>\n",
       "      <td>15.905483</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>481</th>\n",
       "      <td>7-Jan-11</td>\n",
       "      <td>25.99</td>\n",
       "      <td>25.971537</td>\n",
       "      <td>20.31</td>\n",
       "      <td>20.307848</td>\n",
       "      <td>15.67</td>\n",
       "      <td>15.643523</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>482</th>\n",
       "      <td>10-Jan-11</td>\n",
       "      <td>25.66</td>\n",
       "      <td>25.643825</td>\n",
       "      <td>18.77</td>\n",
       "      <td>18.761895</td>\n",
       "      <td>15.66</td>\n",
       "      <td>15.633118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>483</th>\n",
       "      <td>11-Jan-11</td>\n",
       "      <td>26.63</td>\n",
       "      <td>26.612427</td>\n",
       "      <td>17.77</td>\n",
       "      <td>17.766595</td>\n",
       "      <td>15.97</td>\n",
       "      <td>15.940214</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>484</th>\n",
       "      <td>12-Jan-11</td>\n",
       "      <td>27.86</td>\n",
       "      <td>27.847145</td>\n",
       "      <td>16.83</td>\n",
       "      <td>16.828630</td>\n",
       "      <td>16.59</td>\n",
       "      <td>16.563290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>485</th>\n",
       "      <td>13-Jan-11</td>\n",
       "      <td>28.96</td>\n",
       "      <td>28.946860</td>\n",
       "      <td>16.10</td>\n",
       "      <td>16.096499</td>\n",
       "      <td>17.44</td>\n",
       "      <td>17.417975</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>486</th>\n",
       "      <td>14-Jan-11</td>\n",
       "      <td>30.69</td>\n",
       "      <td>30.677527</td>\n",
       "      <td>14.88</td>\n",
       "      <td>14.876749</td>\n",
       "      <td>18.68</td>\n",
       "      <td>18.651377</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>487</th>\n",
       "      <td>18-Jan-11</td>\n",
       "      <td>30.47</td>\n",
       "      <td>30.453728</td>\n",
       "      <td>13.43</td>\n",
       "      <td>13.428645</td>\n",
       "      <td>20.11</td>\n",
       "      <td>20.090356</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>488</th>\n",
       "      <td>19-Jan-11</td>\n",
       "      <td>26.89</td>\n",
       "      <td>26.875055</td>\n",
       "      <td>13.98</td>\n",
       "      <td>13.975834</td>\n",
       "      <td>20.93</td>\n",
       "      <td>20.910785</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>489</th>\n",
       "      <td>20-Jan-11</td>\n",
       "      <td>24.18</td>\n",
       "      <td>24.173823</td>\n",
       "      <td>20.32</td>\n",
       "      <td>20.321338</td>\n",
       "      <td>20.06</td>\n",
       "      <td>20.035601</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>490</th>\n",
       "      <td>21-Jan-11</td>\n",
       "      <td>23.44</td>\n",
       "      <td>23.432635</td>\n",
       "      <td>18.32</td>\n",
       "      <td>18.314995</td>\n",
       "      <td>19.50</td>\n",
       "      <td>19.480095</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>491</th>\n",
       "      <td>24-Jan-11</td>\n",
       "      <td>21.33</td>\n",
       "      <td>21.327003</td>\n",
       "      <td>16.67</td>\n",
       "      <td>16.669228</td>\n",
       "      <td>18.99</td>\n",
       "      <td>18.964268</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>492</th>\n",
       "      <td>25-Jan-11</td>\n",
       "      <td>21.14</td>\n",
       "      <td>21.132674</td>\n",
       "      <td>15.70</td>\n",
       "      <td>15.695587</td>\n",
       "      <td>18.68</td>\n",
       "      <td>18.664203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>493</th>\n",
       "      <td>26-Jan-11</td>\n",
       "      <td>24.89</td>\n",
       "      <td>24.883167</td>\n",
       "      <td>14.72</td>\n",
       "      <td>14.714474</td>\n",
       "      <td>19.18</td>\n",
       "      <td>19.165335</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>494</th>\n",
       "      <td>27-Jan-11</td>\n",
       "      <td>27.76</td>\n",
       "      <td>27.749872</td>\n",
       "      <td>13.80</td>\n",
       "      <td>13.802837</td>\n",
       "      <td>20.21</td>\n",
       "      <td>20.193859</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>495</th>\n",
       "      <td>28-Jan-11</td>\n",
       "      <td>22.67</td>\n",
       "      <td>22.661439</td>\n",
       "      <td>26.47</td>\n",
       "      <td>26.465173</td>\n",
       "      <td>19.32</td>\n",
       "      <td>19.304492</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>496</th>\n",
       "      <td>31-Jan-11</td>\n",
       "      <td>20.85</td>\n",
       "      <td>20.849836</td>\n",
       "      <td>25.18</td>\n",
       "      <td>25.180058</td>\n",
       "      <td>18.61</td>\n",
       "      <td>18.597558</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>497</th>\n",
       "      <td>1-Feb-11</td>\n",
       "      <td>28.50</td>\n",
       "      <td>28.494779</td>\n",
       "      <td>22.25</td>\n",
       "      <td>22.245196</td>\n",
       "      <td>18.16</td>\n",
       "      <td>18.148938</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>498</th>\n",
       "      <td>2-Feb-11</td>\n",
       "      <td>27.53</td>\n",
       "      <td>27.528440</td>\n",
       "      <td>21.49</td>\n",
       "      <td>21.490798</td>\n",
       "      <td>17.75</td>\n",
       "      <td>17.732363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>499</th>\n",
       "      <td>3-Feb-11</td>\n",
       "      <td>25.45</td>\n",
       "      <td>25.444611</td>\n",
       "      <td>24.37</td>\n",
       "      <td>24.364925</td>\n",
       "      <td>16.63</td>\n",
       "      <td>16.620596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>500</th>\n",
       "      <td>4-Feb-11</td>\n",
       "      <td>26.99</td>\n",
       "      <td>26.983428</td>\n",
       "      <td>23.05</td>\n",
       "      <td>23.044815</td>\n",
       "      <td>16.01</td>\n",
       "      <td>15.995752</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>501</th>\n",
       "      <td>7-Feb-11</td>\n",
       "      <td>31.08</td>\n",
       "      <td>31.096237</td>\n",
       "      <td>21.60</td>\n",
       "      <td>21.613907</td>\n",
       "      <td>16.15</td>\n",
       "      <td>16.138168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>502</th>\n",
       "      <td>8-Feb-11</td>\n",
       "      <td>30.46</td>\n",
       "      <td>30.468473</td>\n",
       "      <td>20.42</td>\n",
       "      <td>20.432851</td>\n",
       "      <td>16.40</td>\n",
       "      <td>16.393715</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>503</th>\n",
       "      <td>9-Feb-11</td>\n",
       "      <td>29.76</td>\n",
       "      <td>29.774259</td>\n",
       "      <td>19.59</td>\n",
       "      <td>19.596236</td>\n",
       "      <td>16.71</td>\n",
       "      <td>16.695279</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>504 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          Date  +DI14    adx_pos  -DI14    adx_neg    ADX        adx\n",
       "0    11-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "1    12-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "2    13-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "3    17-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "4    18-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "5    19-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "6    20-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "7    23-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "8    24-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "9    25-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "10   26-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "11   27-Feb-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "12    2-Mar-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "13    3-Mar-09    NaN   0.000000    NaN   0.000000    NaN   0.000000\n",
       "14    4-Mar-09   6.75   0.000000  32.42   0.000000    NaN   0.000000\n",
       "15    5-Mar-09   6.29   6.211080  33.95  33.905948    NaN   0.000000\n",
       "16    6-Mar-09   5.78   5.707553  36.43  36.363498    NaN   0.000000\n",
       "17    9-Mar-09   5.29   5.218511  33.89  33.833621    NaN   0.000000\n",
       "18   10-Mar-09   8.70   8.607418  30.02  29.979642    NaN   0.000000\n",
       "19   11-Mar-09  12.49  12.439537  28.47  28.418365    NaN   0.000000\n",
       "20   12-Mar-09  16.68  16.607016  25.87  25.819768    NaN   0.000000\n",
       "21   13-Mar-09  16.63  16.561031  24.90  24.848462    NaN   0.000000\n",
       "22   16-Mar-09  16.69  16.628316  23.47  23.407767    NaN   0.000000\n",
       "23   17-Mar-09  17.93  17.822424  21.65  21.598281    NaN   0.000000\n",
       "24   18-Mar-09  22.73  22.605910  19.92  19.866406    NaN   0.000000\n",
       "25   19-Mar-09  21.61  21.501883  18.94  18.896172    NaN   0.000000\n",
       "26   20-Mar-09  19.95  19.856265  20.64  20.614351    NaN   0.000000\n",
       "27   23-Mar-09  23.82  23.718187  18.13  18.116193  33.58  33.707888\n",
       "28   24-Mar-09  22.81  22.729402  17.36  17.360949  32.15  32.256674\n",
       "29   25-Mar-09  20.61  20.550127  20.20  20.175421  29.93  30.018346\n",
       "..         ...    ...        ...    ...        ...    ...        ...\n",
       "474  29-Dec-10  20.05  20.021345  19.67  19.655591  15.42  15.375191\n",
       "475  30-Dec-10  19.34  19.312610  21.52  21.508529  14.70  14.661203\n",
       "476  31-Dec-10  18.10  18.072484  24.99  24.979065  14.79  14.759873\n",
       "477   3-Jan-11  29.06  29.028563  21.02  21.008156  14.88  14.850528\n",
       "478   4-Jan-11  26.71  26.688349  19.71  19.698422  14.90  14.866119\n",
       "479   5-Jan-11  27.04  27.013655  17.99  17.987989  15.27  15.236846\n",
       "480   6-Jan-11  28.66  28.637416  17.34  17.330368  15.93  15.905483\n",
       "481   7-Jan-11  25.99  25.971537  20.31  20.307848  15.67  15.643523\n",
       "482  10-Jan-11  25.66  25.643825  18.77  18.761895  15.66  15.633118\n",
       "483  11-Jan-11  26.63  26.612427  17.77  17.766595  15.97  15.940214\n",
       "484  12-Jan-11  27.86  27.847145  16.83  16.828630  16.59  16.563290\n",
       "485  13-Jan-11  28.96  28.946860  16.10  16.096499  17.44  17.417975\n",
       "486  14-Jan-11  30.69  30.677527  14.88  14.876749  18.68  18.651377\n",
       "487  18-Jan-11  30.47  30.453728  13.43  13.428645  20.11  20.090356\n",
       "488  19-Jan-11  26.89  26.875055  13.98  13.975834  20.93  20.910785\n",
       "489  20-Jan-11  24.18  24.173823  20.32  20.321338  20.06  20.035601\n",
       "490  21-Jan-11  23.44  23.432635  18.32  18.314995  19.50  19.480095\n",
       "491  24-Jan-11  21.33  21.327003  16.67  16.669228  18.99  18.964268\n",
       "492  25-Jan-11  21.14  21.132674  15.70  15.695587  18.68  18.664203\n",
       "493  26-Jan-11  24.89  24.883167  14.72  14.714474  19.18  19.165335\n",
       "494  27-Jan-11  27.76  27.749872  13.80  13.802837  20.21  20.193859\n",
       "495  28-Jan-11  22.67  22.661439  26.47  26.465173  19.32  19.304492\n",
       "496  31-Jan-11  20.85  20.849836  25.18  25.180058  18.61  18.597558\n",
       "497   1-Feb-11  28.50  28.494779  22.25  22.245196  18.16  18.148938\n",
       "498   2-Feb-11  27.53  27.528440  21.49  21.490798  17.75  17.732363\n",
       "499   3-Feb-11  25.45  25.444611  24.37  24.364925  16.63  16.620596\n",
       "500   4-Feb-11  26.99  26.983428  23.05  23.044815  16.01  15.995752\n",
       "501   7-Feb-11  31.08  31.096237  21.60  21.613907  16.15  16.138168\n",
       "502   8-Feb-11  30.46  30.468473  20.42  20.432851  16.40  16.393715\n",
       "503   9-Feb-11  29.76  29.774259  19.59  19.596236  16.71  16.695279\n",
       "\n",
       "[504 rows x 7 columns]"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[['Date', '+DI14', 'adx_pos', '-DI14', 'adx_neg', 'ADX', 'adx']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "colab": {
   "collapsed_sections": [
    "5BVYddeJg-An"
   ],
   "last_runtime": {
    "build_target": "",
    "kind": "local"
   },
   "name": "Structural Time Series Modeling Case Studies: Atmospheric CO2 and Electricity Demand",
   "provenance": [
    {
     "file_id": "1ZrZXuGar-SJOCQZk64HxJ8pOSY2JLqzx",
     "timestamp": 1551736254082
    }
   ],
   "version": "0.3.2"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
